package springcloud.feign.fallback;

import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;
import springcloud.feign.AddressOpenfeign;

/**
 * @Author 咕唧
 * @Date 2022/6/25 20:19
 * @Version 1.0
 */
@Component
public class AddressOpenfeignFallBackFactory implements FallbackFactory<AddressOpenfeign> {

    @Override
    public AddressOpenfeign create(Throwable throwable) {
        //返回一个接口的实例对象
        return new AddressOpenfeignFallBack();
    }
}
